<style>
	/*** 模型的样式表 ***/
	<#if reportModel?? && reportModel.viewtype != "view">
	.cz_<#if reportModel??>${reportModel.id}</#if>{
		<#if reportModel?? && reportModel.height??>height:${reportModel.height}px;<#else>height:220px;</#if>width:<#if reportModel??>${reportModel.width!'400'}px</#if>; margin: 0 auto;
	}  
	.cz_<#if reportModel??>${reportModel.id}</#if>_table{
		padding:5px;margin-left: 0px; margin-right: 0px; height: 225px;overflow:auto;
	}
	</#if>
	<#if reportModel?? && reportModel.styles??>
	<#list reportModel.styles as style>
	<#if style.pline??  && style.pline == "0">
	.cz_${style.dataid}_even{
		${style.style!''}
	}
	<#elseif style.pline??  && style.pline == "1">
	.cz_${style.dataid}_odd{
		${style.style!''}
	}
	<#else>
	.cz_${style.dataid}{
		${style.style!''}
	}
	</#if>
	</#list>
	</#if>
	td{white-space: nowrap;}
</style>
<script>
	$(document).ready(function(){
		//$(".shrinkage .sk_bt").addClass("active");
		$(".shrinkage table:not(:first)").hide();
	 
		$(".shrinkage .sk_bt").click(function(){
			$(this).next("table")
				.slideToggle("fast",function(){
					resizeDesign();
				})
				.siblings("table").slideUp("fast");
			$(this).toggleClass("active");
			$(this).siblings(".sk_bt").removeClass("active");
			resizeDesign();
		});
		resizeDesign();
	});
	window.onload=window.onresize=function(){
		  resizeDesign();
	}
	function resizeDesign(){
		var winHeight = $(window).height() , winWidth = $(window).width();
		var isNotIE=-[-1,];
		if(isNotIE)
		{
			 scrollHeight = document.body.scrollHeight;//非IE浏览器
		}
		else
		{
			 scrollHeight = document.documentElement.scrollHeight;//IE浏览器
		}
		$('#design_table').height(winHeight-135 - $('.shrinkage').height());

			
	}
	function submitSearchForm(action){
		//$("#beginNum").val($("#beginNumShow").val());
		//$("#endNum").val($("#endNumShow").val());
		var reg = /^[0-9]*$/;
		if(reg.test($("#p").val())){
			location.href = "<#if col??&&row??>/${orgi}/user/report/reportdrilldown/${report.id!''}/${reportModel.id!''}/${pageNumber!''}/${row!''}/${col!''}.html<#else>/${orgi}/user/report/view/${report.id!''}.html</#if>?p="+$("#p").val()+"&ps="+$("#ps").val()+"&opt="+action ;
		}else{
			art.alert("请输入正确的页码信息！");
		}
	}

</script>

<div class="container rs_layout" wrapper="true"><!-- Everything started here -->
	<div class="rs_layout_top">
		<div class="nav_top"><!--NavTop-->
			<div class="nav_controlBar">
				<ul class="nav_controlList">
					<li class="nav_controlIthems"><a href="/${orgi}/user/index.html"><i class="navIcons nicon-2"></i>首页</a></li>
					<li class="nav_controlIthems"><a href="javascript:window.close();"><i class="navIcons nicon-5"></i>退出</a></li>
				</ul>
				<div class="nav_name">欢迎使用，<#if user??>${user.username!''}<#else>Guest</#if></div>
			</div>
			<h1 class="comName">
			<#if dashboard??>
				${dashboard.name!''}
			
			<#else>
				${report.name!''}
				<#if report.description??&&report.description!=''><a href="javascript:art.alert($('#report_description').val());" style="text-decoration: none;" title="点击查看帮助"><img width="12" height="12" src="/assets/images/help.png"></a></#if>
				<textarea style="display: none;" id="report_description"><div style="width:800px; height:400px; overflow: auto;"><#noescape>${report.description!''}</#noescape></div></textarea>
			</#if></h1>
		</div>
		<ul class="nav_tapWrap">
			<li class="nav_tapIthems cur"><i class="tabIcon"></i>报表查看</li>
		</ul>
	</div>
	<div class="rs_layout_center reTabcon">
		<div class="rs_layout show">
			
			<div class="rs_layout_top breadCrumbWrap" style="border:0px;">
				<div class="breadCrumbStart">您当前的位置是在：</div>
				<ul class="breadCrumb">
					<li class="bc_ithems"><a href="#">报表查看</a></li>
					<li class="bc_ithems">
							${report.name!''}
					</li>
				</ul>
		</div>
			
			<!--<div class="rs_layout_right" style="width:300px;"></div>-->
			<div class="rs_layout_center">
				
				<form id="filterlist_form" action="/${orgi}/user/report/view/${report.id!''}.html" method="post">
					<div class="shrinkage" style="border-top:solid 2px #d8af84;">
						<div class="sk_bt active">
							<p>
								<i>
								</i>
							</p>
						</div>
						<#include "filterlist.html"/>		
					</div>
				</form>
				<div class="designer_k noborder cz_<#if reportModel??>${reportModel.id}</#if>" style="overflow:auto;" id="design_table" >
					<#if reportModel??&&reportModel.viewtype?? && reportModel.viewtype == "view">
						<#include "tableview.html"/>
					<#else>
						<#include "chartview.html"/>
					</#if>
				</div>
			</div>
			<div class="rs_layout_bottom toolBar_bottom" style="background-color:#FFFFFF;z-index: 100;position: absolute;width: 100%;bottom:5px;">
				<form action="<#if col??&&row??>/${orgi}/user/report/reportdrilldown/${report.id!''}/${reportModel.id!''}/${row!''}/${col!''}.html<#else>/${orgi}/user/report/view/${report.id!''}.html</#if>" method="get">
				<p class="fx_icon" style="text-align:center;padding:0px;">
					<input name="opt" type="hidden" value="current"/>
					<div class="papers_1" style="float:right;line-height:18px;margin:0 10px 0 5px;">
						<img class="pageElems" onclick="submitSearchForm('current');" title="查询" alt="查询" src="/assets/images/action_go.gif">
						<img class="pageElems" onclick="$('#p').val('1');submitSearchForm('first');" title="首页" alt="首页" src="/assets/images/go-first-view.png">
						<img class="pageElems" onclick="$('#p').val('<#if reportData?? && reportData.page gt 1>${reportData.page - 1}<#else>1</#if>');submitSearchForm('last');" title="上一页" alt="上一页" src="/assets/images/go-previous-view.png">			
						<img class="pageElems" onclick="$('#p').val('<#if reportData?? && reportData.data?? && reportData.data?size == reportData.pageSize>${reportData.page + 1}<#else><#if reportData??>${reportData.page}</#if></#if>');submitSearchForm('next');" title="下一页" alt="下一页" src="/assets/images/go-next-view.png">
						<img class="pageElems" onclick="$('#p').val('<#if reportData?? && reportData.pageSize gt 1 && reportData.total / reportData.pageSize gt 0>${(reportData.total / reportData.pageSize)?ceiling}<#else>1</#if>');submitSearchForm('final');" title="尾页" alt="尾页" src="/assets/images/go-last-view.png">
					</div>
					<div style="float:right;line-height:20px;">
						<label style="font-size: 13px;color: #4095d4;"><#if reportModel?? && reportModel.querytext?? && reportModel.querytext?length gt 0>自定义查询，</#if>执行时间：<#if reportModel?? && reportData??>${reportData.queryTime/1000.0}<#else>0</#if> 秒 ，<#if reportData?? && reportData.total gt 0>总计：${reportData.total}条，</#if></label>
						<label style="font-size: 13px;">跳转到第</label>
						<input name="p" type="text" style="width: 30px;height: 10px;" id="p" value="<#if reportData??>${reportData.page}<#else>1</#if>">
						<label style="font-size: 13px;">页，</label>
						<label style="font-size: 13px;">每页</label>
						<select name="ps" id="ps" style="width: 55px;height: 20px;padding:0px;">
							<option value="10" <#if reportData?? && reportData.pageSize == 10>selected="selected"</#if>>10</option>
							<option value="20" <#if reportData?? && reportData.pageSize == 20>selected="selected"</#if>>20</option>
							<option value="50" <#if reportData?? && reportData.pageSize == 50>selected="selected"</#if>>50</option>
							<option value="100" <#if reportData?? && reportData.pageSize == 100>selected="selected"</#if>>100</option>
							<option value="200" <#if reportData?? && reportData.pageSize == 200>selected="selected"</#if>>200</option>
							<!-- <option value="0">不限</option>  -->
						</select>
						<label style="font-size: 13px;">条，</label>
					</div>
				</p>
				</form>
			</div>
		</div>
</div>